package java_demos.java_basic.instance_demos.about_string;

public class StringReplaceEmp {
    public static void main(String[] args) {
        /**
         * @description:
         * @author: 替换字符串
         * @date: 2024/5/29 下午2:42
         * @param: [args]
         * @return: void
         **/

        String str = "Hello World";
        System.out.println(str.replace("H","W"));
        System.out.println(str.replaceFirst("He","Wa"));
        System.out.println(str.replaceAll("He","Ha"));


    }
}
